//
//  Profile.m
//  GradeKeeper
//
//  Created by Lily Wang on 11/1/09.
//  Copyright 2009 i5. All rights reserved.
//

#import "Profile.h"


@implementation Profile
@synthesize userName, enteredCGPA, enteredCreditsUsed, enteredSemester;
static Profile *sharedProfile = nil;

//Creates a global profile that can be shared between ui view change
//This global profile will contain information on the currently selected profile
+ (Profile *) sharedProfile{
    @synchronized(self) {
        if (sharedProfile == nil) {
            sharedProfile = [[Profile alloc] init];
        }
    }
    return sharedProfile;
} //sharedProfile

- (void) setUserName: (NSString*) inputName {
	userName = inputName;
} //setUserName

- (NSString*) getUserName {
	return userName;
	
} //getUserName

- (void) setCGPA: (NSString*) cgpa {
	enteredCGPA = cgpa;
	NSLog(@"EnteredCGPA called: %@, %@", enteredCGPA, userName);
} //setCGPA

- (void) setCredits: (NSString*) credits {
	Credits = credits;
} //setUserName

<<<<<<< .mine
- (void) setSemester: (NSString*) semester {
	Semester = semester;
} //setUserName



- (NSString*) getUserName {
	return userName;
=======
-(NSString*) getCGPA {
	NSLog(@"get cgpa called %@", enteredCGPA);
	return enteredCGPA;
	
} //getCGPA
>>>>>>> .r69

- (void) setCreditsUsed: (NSString*) creditsUsed {
	enteredCreditsUsed = creditsUsed;
} //setCreditsUsed


-(NSString*) getCreditsUsed {
	return enteredCreditsUsed;
} //getCreditsUsed

- (void) setSemester: (NSString*) semester {
	enteredSemester = semester;
	NSLog(@"EnteredSemester called: %@", enteredSemester );
} //setSemester


-(NSString*) getSemester {
	NSLog(@"getSemester called: %@", enteredSemester );
	return enteredSemester;
} //getSemester
-(NSString*) getCredits {
	return Credits;
}
-(NSString*) getSemester {
	return Semester;
}
@end
